//
//  NavigationViewController.swift
//  CosClub
//
//  Created by 沙睿 on 2020/2/2.
//  Copyright © 2020 ios. All rights reserved.
//

import UIKit

open class NavigationViewController: UINavigationController {

    public override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }

    public override func pushViewController(_ viewController: UIViewController, animated: Bool)
    {
        if self.children.count > 0 {
            viewController.hidesBottomBarWhenPushed = true
        }
        super.pushViewController(viewController, animated: animated)
    }
}

extension UINavigationController {
    public var height: CGFloat {
        get {
            self.navigationBar.frame.size.height
        }
    }
}
